<script>
for(let white=0;white<=31;white++){
    var red=25-white,black=31-white;
    if(28==red+black){
        alert('红球:'+red+'\n'+'白球：'+white+'\n'+'黑球:'+black)
    }
}
</script>